#!/bin/bash
pids=`pgrep -f "/root/webpy/webpy_mysql/main.py"`
kill -9 $pids
echo "kill spawn-fcgi application (PID: $pids) finished"

chmod -R +x /root/webpy/webpy_mysql
spawn-fcgi -d /root/webpy/webpy_mysql -f /root/webpy/webpy_mysql/main.py -a 127.0.0.1 -p 9002